package com.utils;

import com.dao.UserDao;
import com.dao.impl.UserDaoImpl;
import com.dao.impl.UserDaoOracleImpl;

public class UserDaoFactory {
    //负责创建dao工厂，负责用户dao实例的创建工作
    public static UserDao getInstance(String key){
        switch (key){
            case "mysql":
                return new UserDaoImpl();
            case "oracle":
                return new UserDaoOracleImpl();
        }
        return null;
    }
}
